FROM python:3.10-slim

WORKDIR /app

COPY . /app

RUN mkdir -p /app/upload

RUN python3 -m venv venv

RUN . venv/bin/activate && pip install --no-cache-dir -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple

ENV PATH="/app/venv/bin:$PATH"

CMD ["python", "main.py"]